{template modoer_header}
{eval _G('loader')->helper('form');}
<script type="text/javascript" src="{URLROOT}/static/javascript/item.js"></script>
<div id="body">
    <div class="myhead"></div>
    <div class="mymiddle">
        <div class="myleft">
        <!--{eval !$mymenu && $mymenu = 'mmenu';}-->
        <!--{template $mymenu,'member','member'}-->
        </div>
        <div class="myright">
            <div class="myright_top"></div>
            <div class="myright_middle">
                <h3><cite>当前操作的主题:<span class="font_2">$_G[manage_subject][name]{if $_G[manage_subject][subname]}($_G[manage_subject][subname]){/if}</span>[<a href="javascript:void(0);" onclick="item_subject_manage();">更换</a>]</cite>公众号设置</h3>
                <div class="mainrail">
                    {if $error}<div class="formerror">$error</div>{/if}
                    {if !$disabled}
                    <form method="post" name="myform" action="{url weixin/member/ac/$ac/rand/$_G[random]}">
                    <table width="100%" cellspacing="0" cellpadding="0" class="maintable">
                        <tr>
                            <td width="120"  align="right"><span class="font_1">*</span>微信公众号：</td>
                            <td width="*">
                                <input type="text" name="wechat" class="t_input" size="60" value="$role_obj->wechat" />
                            </td>
                        </tr>
                        <tr>
                            <td align="right" valign="top">服务器地址：</td>
                            <td>
                                {print S(siteurl)}api/weixin/subject.php?sid={$sid}
                                <p class="font_3">把您上面的URL地址填写到微信公众平台后台-开发者中心，URL（服务器地址）中。</p>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" valign="top"><span class="font_1">*</span>Token(令牌)：</td>
                            <td>
                                <input type="text" name="token" class="t_input" size="60" value="$role_obj->token" />
                                <p class="font_3">填写任意英文和数字，然后 把此处填写的Token复制到微信公众平台，启用"开发者中心"里的“开发模式”，并保持两边一致。</p>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" valign="top">AppID：</td>
                            <td>
                                <input type="text" name="appid" class="t_input" size="60" value="$role_obj->appid" />
                                <p class="font_3">在公众平台高级功能页面，可以找到；微信公众平台账号如果没认证则没有AppID，也无法使用自定义菜单</p>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" valign="top">AppSecret：</td>
                            <td>
                                <input type="text" name="appsecret" class="t_input" size="60" value="$role_obj->appsecret" />
                                <p class="font_3">同上</p>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" valign="top">EncodingAESKey：</td>
                            <td>
                                <input type="text" name="config[encode_key]" class="t_input" size="60" value="{print $role_obj->config->encode_key}" />
                                <p class="font_3">消息加解密密钥，获取位置同上</p>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" valign="top">消息加解密方式：</td>
                            <td>
                                {print form_radio('config[encode_type]', array('0'=>'明文模式','1'=>'加密模式'), $role_obj->config->encode_type)}
                                <p class="font_3">请同时在微信公众平台设置相同的加解密方式；选择加密模式时，请务必填写上方的EncodingAESKey。</p>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" valign="top">显示默认回复：</td>
                            <td>
                                {print form_bool('config[use_default_cmd]',$role_obj->config->use_default_cmd)}
                                <p class="font_3">当用户回复的指令无法识别时，总是回复默认指令（默认指令在<a href="{url weixin/member/ac/g_cmd}">自定义指令</a>设置）。</p>
                            </td>
                        </tr>
                        <tr>
                            <td></td>
                            <td>
                                <input type="hidden" name="id" value="$role_obj->id" />
                                <button type="submit" name="dosubmit" value="yes">提交</button>
                                <span class="font_3">标记" * "号设置项为必填</span>
                            </td>
                        </tr>
                    </table>
                    </form>
                    {/if}
                </div>
            </div>
        </div>
        <div class="clear"></div>
    </div>
    <div class="mybottom"></div>
</div>
<!--{eval footer();}-->